﻿using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using System.Data;

namespace Htss.Platform.Data
{
    /// <summary>
    /// 特性:用来标识表的列名(存储过程参数,字段)等
    /// </summary>
    [AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
    public class FieldAttribute:Attribute
    {
        public FieldAttribute() 
        {
            this.SqlDbType = 0;
            this.Size = 0;
            this.DbFieldType = DbFieldType.Ordinary;
        }
        /// <summary>
        /// 字段名
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 长度大小
        /// </summary>
        public int Size { get; set; }
        /// <summary>
        /// 字段类型
        /// </summary>
        public SqlDbType SqlDbType { get; set; }
        /// <summary>
        /// 字段标识(主键或特殊属性)
        /// </summary>
        public DbFieldType DbFieldType { get; set; }
    }
}
